#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
int int_cmp(const void* e1, const void* e2)
{
    return (*(int*)e2 - *(int*)e1);
}
int main()
{
    long long tel = 0;
    scanf("%lld", &tel);
    int arr[15] = { 0 };
    int t = 0;
    for (int i = 0; i < 11; i++)
    {
        if (i == 0)
        {
            arr[i] = tel % 10;
            tel /= 10;
            t = 1;
        }
        else
        {
            int flag = 1;
            for (int a = 0; a < t; a++)
            {
                if (tel % 10 == arr[a])
                    flag = 0;
            }
            if (flag == 1)
            {
                arr[t] = tel % 10;
                printf("%d", arr[t]);
                t++;
            }
            tel /= 10;
        }
    }
    qsort(arr, t, sizeof(int), int_cmp);
    for (int c = 0; c < t; c++)
    {
        printf("%d", arr[c]);
    }
    return 0;
}